/*
 *  Copyright 2002 by Texas Instruments Incorporated.
 *  All rights reserved. Property of Texas Instruments Incorporated.
 *  Restricted rights to use, duplicate or disclose this code are
 *  granted through contract.
 *  
 */
/*
 *  ======== celldiff.h ========
 */

#ifndef CELLDIFF_
#define CELLDIFF_

#include <icell.h>

#include "idiff.h"

#ifdef __cplusplus
extern "C" {
#endif

// v-table for this cell 
extern ICELL_Fxns DIFF_CELLFXNS;

// v-table for this cell's algorithm
extern far IDIFF_Fxns DIFF_IDIFF;

/*
 *  ======== DIFF_cellExecute ========
 *  Function used to execute the algorithm corresponding to the cell 
 */
Bool DIFF_cellExecute( ICELL_Handle handle, Arg arg );

/* 
 * ======== DIFF cell environment ========
 */
typedef struct DIFF_Env {
    Char *intYBuf;		//internal Y buffer for processing
    Char *intCrBuf;		//internal Cr buffer for processing
    Char *intCbBuf;		//internal Cb buffer for processing
    Char *prevY;		//Y reference frame buffer
    Char *prevCr;		//Cr reference frame buffer
    Char *prevCb;		//Cb reference frame buffer
    Uns   yBufSize;		//Number Y pixels in single processing block
    Uns   crBufSize;	//Number Cr pixels in single processing block
    Uns   cbBufSize;	//Number Cb pixels in single processing block
    Uns   numBlocks;	//Number of processing blocks
    Bool  SetReference;	//If true, need to reset reference frame
    Int   yValue;		//Y value for unequal pixels
    Int   crValue;		//Cr value for unequal pixels
    Int   cbValue;		//Cb value for unequal pixels
    Int	  linePitch;	//linePitch for buffer transfer
} DIFF_Env;

#ifdef __cplusplus
}
#endif // extern "C" 

#endif // CELLDIFF_


